<!-- 常见问题模块 -->
<section id="<?= $data['type'] ?? 'faq' ?>" class="py-[<?= $data['styles']['padding']['top'] ?? '60' ?>px] py-[<?= $data['styles']['padding']['bottom'] ?? '60' ?>px] bg-[<?= $data['styles']['backgroundColor'] ?? 'white' ?>]" style="max-width: <?= $data['styles']['maxWidth'] ?? '100%' ?>; margin: <?= $data['styles']['margin'] ?? '0 auto' ?>">
  <div class="container mx-auto px-4 sm:px-6 lg:px-8">
    <div class="text-center max-w-2xl mx-auto mb-12">
      <?php if (!empty($data['content']['sectionBadge'])): ?>
      <div class="inline-block px-4 py-1 bg-primary/10 text-primary rounded-full text-sm font-medium mb-4">
        <?= $data['content']['sectionBadge'] ?>
      </div>
      <?php endif; ?>
      <h2 class="text-[clamp(1.5rem,3vw,2.5rem)] font-bold text-dark mb-4">
        <?= $data['content']['sectionTitle'] ?>
      </h2>
      <p class="text-dark/70">
        <?= $data['content']['sectionSubtitle'] ?>
      </p>
    </div>
    
    <div class="max-w-3xl mx-auto space-y-4">
      <?php if (!empty($data['content']['items'])): ?>
        <?php foreach ($data['content']['items'] as $index => $item): ?>
          <div class="border border-gray-200 rounded-xl overflow-hidden">
            <button class="faq-toggle w-full flex justify-between items-center p-6 text-left font-medium hover:bg-gray-50 transition-custom">
              <span><?= $item['question'] ?></span>
              <i class="fa fa-plus text-primary transition-transform"></i>
            </button>
            <div class="faq-content<?= ($index === $data['content']['defaultOpen'] - 1) ? '' : ' hidden' ?> px-6 pb-6 text-dark/70">
              <p><?= $item['answer'] ?></p>
            </div>
          </div>
        <?php endforeach; ?>
      <?php endif; ?>
    </div>
    
    <div class="text-center mt-12">
      <?php if (!empty($data['content']['ctaButton'])): ?>
        <a href="<?= $data['content']['ctaButton']['href'] ?? '#contact' ?>" class="inline-flex items-center text-primary font-medium hover:underline">
          <?= $data['content']['ctaButton']['text'] ?> <i class="fa fa-arrow-right ml-2"></i>
        </a>
      <?php else: ?>
        <p class="text-dark/70 mb-4">还有其他问题？</p>
        <a href="#contact" class="inline-flex items-center text-primary font-medium hover:underline">
          联系我们获取更多帮助 <i class="fa fa-arrow-right ml-2"></i>
        </a>
      <?php endif; ?>
    </div>
  </div>
</section>